//
//  YTNetworkManager+YiTaiNetwork.h
//  yitaicaijing
//
//  Created by DIANGHONG on 2018/7/13.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "YTNetworkManager.h"
#import "YTHomeBanner.h"
#import "YTHomeMainModel.h"
#import "YTHomeDetailModel.h"
#import "YTDHNewComment.h"
#import "YTFollowAuthorModel.h"
#import "YTSiginModel.h"
#import "YTHomeSearchModel.h"
#import "YTEtaiModel.h"
#import "YTRankModel.h"
#import "YTETAIPorpertyModel.h"
#import "YTETAILogModel.h"
#import "YTAuthorPostArticleModel.h"

@interface YTNetworkManager (YiTaiNetwork)
//- (void)requestCatorgList;
- (void)requestCatorgListWithCompletion:(void(^)(NSArray *list ,BOOL isSuccess ,NSString *error))completion;

#pragma mark: - 加载banner 网络请求
- (void)requestBannerWithCompletion:(void(^)(YTHomeBanner *banner ,BOOL isSuccess ,NSString *error))completion;

//- (void)requestHomeData;
#pragma mark: - 快讯列表 网络请求
- (void)requestNewFlashWithCompletion:(void(^)(NSArray *list ,BOOL isSuccess ,NSString *error))completion;

#pragma mark: - 首页文章 网络请求
- (void)requestHomeListWithTerm_id:(NSString *)term_id
                             paged:(int)page
                         page_size:(int)page_size
                        menu_order:(BOOL)menu_order
                           mintime:(NSString *)mintime
                        completion:(void(^)(YTHomeMainModel *model ,BOOL isSuccess ,NSString *error))completion;

#pragma mark: - 文章详情网络请求
- (void)requestArticleDetailWithID:(NSString *)ID
                        completion:(void(^)(YTHomeDetailModel *model ,BOOL isSucc ,NSString *error))completion;

#pragma mark: - 热门评论 网络请求
- (void)requestHotCommentWithTid:(NSString *)tid
                           paged:(int)paged
                       page_size:(NSString *)page_size
                      completion:(void(^)(YTDHNewComment *comModel ,BOOL isSucc,NSString *error))completion;

#pragma mark: - 文章一级评论 网络请求
- (void)requestHDCommentListWithTid:(NSString *)tid
                              paged:(int)page
                         completion:(void(^)(YTDHNewComment *model ,BOOL isSuccess ,NSString *error))completion;

#pragma mark: - 用户登录、注册 网络请求
- (void)requestLoginOrRegistWithPhone:(NSString *)phone
                                 code:(NSString *)code
                           completion:(void(^)(BOOL isSucc ,NSString *error))completion;

#pragma mark: - 关注作者的 网络请求
- (void)requestFollowAuthorWithFollowID:(NSString *)followID isFollow:(BOOL)isFollow
                             completion:(void(^)(BOOL isSucc,BOOL isReward, NSString *error))completion;

#pragma mark: - 相关文章 网络请求
- (void)requestRelatArticleWithTid:(NSString *)tid
                             paged:(int)paged
                         page_size:(int)page_size
                        completion:(void(^)(NSArray *list ,BOOL isSucc, NSString *classID,NSString *error))completioon;

#pragma mark: - 文章详情点赞 网络请求
- (void)requestLikesArticleWithTid:(NSString *)tid
                              tuid:(NSString *)tuid
                        completion:(void(^)(BOOL isSucc, NSString *StatusInfo))completion;

#pragma mark: - 快讯首页 网络请求
- (void)requestMainNewFlashWithPage:(int)page
                          page_size:(NSString *)page_size
                            mintime:(NSString *)mintime
                         completion:(void(^)(id json ,BOOL isSucc))completion;

#pragma mark: - 签到奖励类型 1每日签到 2注册 3文章阅读 4文章点赞 5文章收藏 6文章评论 7文章分享 8快讯投票 9快讯分享 网络请求
- (void)requestSiginWithType:(NSString *)type
                     post_id:(NSString *)post_id
                  completion:(void(^)(BOOL isSucc, NSString *StatusInfo))completion;


#pragma mark: - 利空点赞接口 网络请求
- (void)postNewFlashGoodOrBadWithlid:(NSString *)lid
                                type:(NSString *)type
                          completion:(void(^)(BOOL isSucc ,NSString *statusInfo))completion;

#pragma mark: - 更新个人信息 网络请求
/**
 更新个人信息 网络请求

 @param meta_key 昵称：user_nicename 性别：sex（0未知 1男 2女） 生日：birthday 简介：description 头像：wp_user_avatar 手机号：user_phone
 @param meta_value  字段值
 @param completion 完成回调
 */
- (void)postEditedMineInfoWithMeta_key:(NSString *)meta_key
                               meta_value:(NSString *)meta_value
                               completion:(void(^)(BOOL isSucc ,NSString *statusInfo))completion;


#pragma mark: - 收藏/浏览历史 网络请求
- (void)requestCollectionListWithIshistory:(BOOL)isHistory
                                     paged:(int)paged
                                 page_size:(int)page_size
                                completion:(void(^)(YTHomeMainModel *model ,BOOL isSuccess ,NSString *error))completion;

#pragma mark: - 发表评论 网络请求
- (void)postCommentWithPostID:(NSString *)post_id
                      content:(NSString *)content
                   completion:(void(^)(BOOL isSucc, NSString *statusInfo))completion;

#pragma mark: - 收藏文章 网络请求
- (void)postFavoriteArticleWithTid:(NSString *)tid
                        isFavorite:(BOOL)isFavorite
                        completion:(void(^)(BOOL isSucc ,NSString *statusInfo))completion;

#pragma mark: - 上传头像 网络请求
- (void)postAvatorWithImage:(UIImage *)image
                 completion:(void(^)(BOOL isSucc, NSString *statusInfo))completion;

#pragma mark: - 获取验证码 网络请求
/**
  获取验证码 网络请求

 @param mobile 手机号
 @param type 短信类型 1登录注册 2修改手机号 3绑定微信
 @param timestamp 时间戳
 @param sign 签名
 @param completion 完成回调
 */
- (void)requestVerifyCodeWithMobile:(NSString *)mobile
                               type:(NSString *)type
                          timestamp:(NSString *)timestamp
                               sign:(NSString *)sign
                         completion:(void(^)(BOOL isSucc, NSString *statusInfo))completion;

#pragma mark: - 获取个人信息 网络请求
- (void)requestUserInfoWithCompletion:(void(^)(BOOL isSucc, NSString *statusInfo))completion;

#pragma mark: - 关注列表 / 作者列表 网络请求
- (void)requestFollowListWithIsAuthorList:(BOOL)isAuthorList
                                    paged:(int)paged
                               completion:(void(^)(YTFollowAuthorModel *model ,BOOL isSucc ,NSString *error))completion;


#pragma mark: - 意见反馈 网络请求
- (void)postFeedBackWithContent:(NSString *)content
                     completion:(void(^)(BOOL isSucc, NSString *statusInfo))completion;

#pragma mark: - 搜索接口 网络请求
- (void)requestSeachWithKeyWord:(NSString *)keyword
                          paged:(int)paged
                      page_size:(NSString *)page_size
                     completion:(void(^)(YTHomeSearchModel *model, BOOL isSucc, NSString *error))completion;


#pragma mark: - 签到详情 网络请求
- (void)requestSiginWithCompletion:(void(^)(YTSiginModel *model,BOOL isSucc, NSString *StatusInfo))completion;

#pragma mark: - 热搜列表 网络请求
- (void)requestHotSearchWithCompletion:(void(^)(NSArray *list ,BOOL isSucc , NSString *error))completion;

#pragma mark: - 获取accessToken
- (void)requestAccessWithSignature:(NSString *)signature
                         device_id:(NSString *)device_id
                          rand_str:(NSString *)rand_str
                         timestamp:(NSString *)timestamp
                        completion:(void(^)(BOOL isSucc, NSString *error))completion;

#pragma mark: - 文章详情 评论点赞
- (void)requestDetailLikeCommentWithTid:(NSString *)tid
                                    pid:(NSString *)pid
                             completion:(void(^)(BOOL isSucc ,NSString *error))completion;

#pragma mark: - 更改手机号 网络请求
- (void)requestChangeMoblie:(NSString *)mobile
                       code:(NSString *)code
                 completion:(void(^)(BOOL isSucc, NSString *statusInfo))completion;

#pragma mark: - 加入我们 网络请求
- (void)requestJoinUsWithCompletion:(void(^)(NSDictionary *dict, NSString *error))completion;

#pragma mark: - 退出登录 网络请求
- (void)requestLogOutWithCompletion:(void(^)(BOOL isSucc, NSString *StatusInfo))completion;

#pragma mark: - 以太星球 网络请求
- (void)requestWithBallDataWithCompletion:(void(^)(YTEtaiModel *model, BOOL isSucc, NSString *error))completion;

#pragma mark: - 收取矿石 网络请求
- (void)requestETAIWithEid:(NSString *)eid completion:(void(^)(id json, BOOL isSucc, NSString *error))completion;


#pragma mark: - 以太星域排行榜 网络请求
- (void)requestWithRankListWithTypes:(NSString *)types
                           page_size:(NSString *)page_size
                          completion:(void(^)(NSArray<YTRankModel *> *rankList, BOOL isSucc, NSString *error))completion;

#pragma mark: - 以太护照 网络请求
- (void)requestWithETAIInfoWithCompletion:(void(^)(YTETAIPorpertyModel *model, BOOL isSucc, NSString *error))completion;
#pragma mark: - 微信登录绑带手机号 网络请求
- (void)requestBindPhoneWithWechat_uuid:(NSString *)wechat_uuid
                                  phone:(NSString *)phone
                                   code:(NSString *)code
                             completion:(void(^)(BOOL isSucc ,NSString *error))completion;

#pragma mark: - 微信登录成功 网络请求
- (void)requestWechatLoginWithWechat_uuid:(NSString *)wechat_uuid
                               completion:(void(^)(BOOL isSucc ,BOOL isBindMoblie,NSString *error))completion;

#pragma mark: - 用户是否签到 网络请求
- (void)requestUserIsSiginWithCompletion:(void(^)(BOOL isSucc,BOOL isSign))completion;


#pragma mark: - 开学季首页（答题个人信息）
- (void)requestUserInfoOfQuestion;


#pragma mark: - 检测
- (void)requestIsPassCompletion:(void(^)(BOOL isSucc,BOOL isPass))completion;

#pragma mark: - 星币明细 网络请求
- (void)requestEtAILogListWithPaged:(int)paged page_size:(int)page_size completion:(void(^)(YTETAILogModel *model,BOOL isSucc,NSString *error))completion;


#pragma mark: - 地址管理 网络请求
- (void)requestAddressIsAddress:(BOOL)isAddress completion:(void(^)(NSArray *list, BOOL isSucc, NSString *error))completion;

#pragma mark: - 设为默认地址 网络请求
- (void)uploadDefaultAddrWithID:(NSString *)ID completion:(void(^)(BOOL isSucc,NSString *error))completion;

#pragma mark: - 新增/编辑收货地址
- (void)addOrEditeCollectAddrWithCollect_id:(NSString *)collect_id
                               collect_name:(NSString *)collect_name
                                      phone:(NSString *)phone
                                   province:(NSString *)province
                                       city:(NSString *)city
                                     county:(NSString *)county
                                       addr:(NSString *)addr
                                 completion:(void(^)(BOOL isSucc,NSString *error))completion;

#pragma mark: - 收货地址信息 网络请求
- (void)requestCollectAddrInfoWithID:(NSString *)ID
                          completion:(void(^)(id json, BOOL isSucc, NSString *error))completion;

#pragma mark: - 新增/编辑钱包
- (void)requestAddOrEditeWalletAddrWithName:(NSString *)name
                                       addr:(NSString *)addr
                                 product_id:(NSString *)product_id
                                  wallet_id:(NSString *)wallet_id
                                 completion:(void(^)(BOOL isSucc,NSString *error))completion;

#pragma mark: - 产品列表 1为虚拟币 2为其他
- (void)requestGetProductListWithType:(NSString *)type
                           completion:(void(^)(NSArray *list, BOOL isSucc, NSString *error))completion;

#pragma mark: - 钱包信息 网络请求
- (void)requestGetWalletInfoWithID:(NSString *)ID
                        completion:(void(^)(id json, BOOL isSucc, NSString *error))completion;

#pragma mark: - 查看作者所发表的文章 网络请求
- (void)requestAuthorArticleWithUserID:(NSString *)user_id
                             page_size:(NSString *)page_size
                            menu_order:(NSString *)menu_order
                               maxtime:(NSString *)maxtime
                               mintime:(NSString *)mintime
                            completion:(void(^)(YTAuthorPostArticleModel *model,BOOL isSucc, NSString *error))completion;

#pragma mark: - 删除收货地址/删除钱包地址
- (void)requestDeleteAddrWithIsWallet:(BOOL)isWallet
                                   ID:(NSString *)ID
                           completion:(void(^)(BOOL isSucc,NSString *error))completion;

#pragma mark: - 用户关注的作者所发布的文章
- (void)requestFocusAuthorArticleWithPage_size:(NSString *)page_size
                                    menu_order:(NSString *)menu_order
                                       maxtime:(NSString *)maxtime
                                       mintime:(NSString *)mintime
                                    completion:(void(^)(YTHomeMainModel *model,BOOL isSucc, NSString *error))completion;
;
@end
